from pdfFinder import PDFFinder
from wordFinder import WordFinder
from unknownFinder import UnknownFinder
from excelFinder import ExcelFinder
from pptFinder import PPTFinder
from imageFinder import ImageFinder


class FinderFactory:

    @staticmethod
    def create_finder_with_file_path(file_name):
        all_finders = [PDFFinder, WordFinder, ExcelFinder, PPTFinder, ImageFinder]
        for FinderClass in all_finders:
            for suffix_path in FinderClass.file_suffixes():
                if file_name.lower().endswith(suffix_path):
                    return FinderClass()

        return UnknownFinder()
